home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 September
/
Macworld (1997-09).dmg
/
Shareware World
/
Comms & Internet
/
Mail*Link SMTP⁄QM Installer
/
Disk 3
/
Sources & Scripts
/
Scripts
/
attach.script
next >
Wrap
Text File
|
1989-06-16
|
815b
|
43 lines
:
mkdir goo.$$ > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "Can not make a temp directory. Quiting."
exit 1
fi
chmod 777 goo.$$
cd goo.$$
uudecode ../$1
if [ $? -ne 0 ]
then
echo "Can not find \"uudecode\" or unexpected error from \"uudecode\"."
echo "Quiting."
cd ..
rm -rf goo.$$
exit 1
fi
foo=`ls -t`
echo $foo | grep .PIT > /dev/null 2>&1
if [ $? -eq 0 ]
then
echo "$foo is a packed file and I cannot continue."
echo "Run single on the $foo or mail the files from QuickMail"
echo "one enclosure at a time."
cd ..
rm -rf goo.$$
exit 1
fi
if [ -f ../$foo ]
then
echo "The file \"$foo\" already exists. Please"
echo "move \"$foo\" to a different filename. Quiting."
cd ..
rm -rf goo.$$
exit 1
fi
mv $foo temp.$$
dd if=temp.$$ skip=1 bs=256 | tr '\015' '\012' > $foo
mv $foo ..
cd ..
rm -rf goo.$$